package com.zqu.service.impl;

import com.zqu.mapper.DevelopmentPlanMapper;
import com.zqu.pojo.DevelopmentPlan;
import com.zqu.service.DevelopmentPlanService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DevelopmentPlanServiceImpl implements DevelopmentPlanService {

    @Autowired(required = false)
    private DevelopmentPlanMapper developmentPlanMapper;

    @Override
    public DevelopmentPlan selectDevelopmentPlanById(long id) {
        return developmentPlanMapper.selectTById(id);
    }

    @Override
    public List<DevelopmentPlan> selectList(DevelopmentPlan developmentPlan) {
        return developmentPlanMapper.selectList(developmentPlan);
    }

    @Override
    public boolean insertDevelopmentPlan(DevelopmentPlan developmentPlan) {
        return developmentPlanMapper.insertT(developmentPlan)>0;
    }

    @Override
    public boolean updateDevelopmentPlan(DevelopmentPlan developmentPlan) {
        return developmentPlanMapper.updateT(developmentPlan)>0;
    }

    @Override
    public boolean deleteDevelopmentPlan(long id) {
        return developmentPlanMapper.deleteT(id)>0;
    }

    @Override
    public boolean deleteDevelopmentPlanByIds(String[] ids) {
        return developmentPlanMapper.deleteTByIds(ids)>0;
    }
}
